/*
 * @Author: white_queen
 * @Date: 2024-07-19 16:54:12
 * @LastEditors: white_queen
 * @LastEditTime: 2024-07-19 17:53:55
 * @FilePath: /http/apis/scoreShop.js
 * @Description: 积分商城模块接口
 */
import request from '../../utils/request.js'
const ScoreShopApi = {
	// 获取商品列表
	getInitList(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/index", "POST", data)
	},
	// 获取商品详情,和商城的商品详情共用一个页面,通过type === 'score' 判断是否为积分商品

	getDetail(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/goods_info", "POST", data)
	},
	// 获取规格详情
	getPriceBySku(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/get_price_by_sku", "POST", data)
	},
	// 确认订单
	confirmOrder(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/confirm_order", "POST", data)
	},
	// 提交订单
	submitOrder(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/submit_order", "POST", data)
	},
	// 订单支付
	payOrder(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/order_pay", "POST", data)
	},
	// 获取订单列表
	getOrderList(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/get_order_list", "POST", data)
	},
	// 订单详情
	getOrderDetail(params) {
		let data = {
			data: params,
		};
		return request("/api/PowerShopping/get_order_info", "POST", data)
	},
}
export default ScoreShopApi